﻿// License: https://opensource.org/licenses/MIT
// Create Date : 2018-01-01

using System;

namespace Cat.Core.XLog
{
    public partial class LoggerBase0
    {
        public void D(object message) { if (_isDebugEnabled) { Exception exc = message as Exception; if (exc != null) Debug(exc, _logStringFormator.DoFormat(exc.Message)); else Debug(null, _logStringFormator.DoFormat(message)); } }
        public void D(string format, object arg0) { if (_isDebugEnabled) Debug(null, _logStringFormator.DoFormat(format, arg0)); }
        public void D(string format, object arg0, object arg1) { if (_isDebugEnabled) Debug(null, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void D(string format, object arg0, object arg1, object arg2) { if (_isDebugEnabled) Debug(null, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void D(string format, params object[] args) { if (_isDebugEnabled) Debug(null, _logStringFormator.DoFormat(format, args)); }
        public void D(Exception exception, object message) { if (_isDebugEnabled) Debug(exception, _logStringFormator.DoFormat(message)); }
        public void D(Exception exception, string format, object arg0) { if (_isDebugEnabled) Debug(exception, _logStringFormator.DoFormat(format, arg0)); }
        public void D(Exception exception, string format, object arg0, object arg1) { if (_isDebugEnabled) Debug(exception, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void D(Exception exception, string format, object arg0, object arg1, object arg2) { if (_isDebugEnabled) Debug(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void D(Exception exception, string format, params object[] args) { if (_isDebugEnabled) Debug(exception, _logStringFormator.DoFormat(format, args)); }

        public void I(object message) { if (_isInfoEnabled) { Exception exc = message as Exception; if (exc != null) Info(exc, _logStringFormator.DoFormat(exc.Message)); else Info(null, _logStringFormator.DoFormat(message)); } }
        public void I(string format, object arg0) { if (_isInfoEnabled) Info(null, _logStringFormator.DoFormat(format, arg0)); }
        public void I(string format, object arg0, object arg1) { if (_isInfoEnabled) Info(null, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void I(string format, object arg0, object arg1, object arg2) { if (_isInfoEnabled) Info(null, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void I(string format, params object[] args) { if (_isInfoEnabled) Info(null, _logStringFormator.DoFormat(format, args)); }
        public void I(Exception exception, object message) { if (_isInfoEnabled) Info(exception, _logStringFormator.DoFormat(message)); }
        public void I(Exception exception, string format, object arg0) { if (_isInfoEnabled) Info(exception, _logStringFormator.DoFormat(format, arg0)); }
        public void I(Exception exception, string format, object arg0, object arg1) { if (_isInfoEnabled) Info(exception, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void I(Exception exception, string format, object arg0, object arg1, object arg2) { if (_isInfoEnabled) Info(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void I(Exception exception, string format, params object[] args) { if (_isInfoEnabled) Info(exception, _logStringFormator.DoFormat(format, args)); }

        public void W(object message) { if (_isWarnEnabled) { Exception exc = message as Exception; if (exc != null) Warn(exc, _logStringFormator.DoFormat(exc.Message)); else Warn(null, _logStringFormator.DoFormat(message)); } }
        public void W(string format, object arg0) { if (_isWarnEnabled) Warn(null, _logStringFormator.DoFormat(format, arg0)); }
        public void W(string format, object arg0, object arg1) { if (_isWarnEnabled) Warn(null, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void W(string format, object arg0, object arg1, object arg2) { if (_isWarnEnabled) Warn(null, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void W(string format, params object[] args) { if (_isWarnEnabled) Warn(null, _logStringFormator.DoFormat(format, args)); }
        public void W(Exception exception, object message) { if (_isWarnEnabled) Warn(exception, _logStringFormator.DoFormat(message)); }
        public void W(Exception exception, string format, object arg0) { if (_isWarnEnabled) Warn(exception, _logStringFormator.DoFormat(format, arg0)); }
        public void W(Exception exception, string format, object arg0, object arg1) { if (_isWarnEnabled) Warn(exception, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void W(Exception exception, string format, object arg0, object arg1, object arg2) { if (_isWarnEnabled) Warn(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void W(Exception exception, string format, params object[] args) { if (_isWarnEnabled) Warn(exception, _logStringFormator.DoFormat(format, args)); }

        public void E(object message) { if (_isErrorEnabled) { Exception exc = message as Exception; if (exc != null) Error(exc, _logStringFormator.DoFormat(exc.Message)); else Error(null, _logStringFormator.DoFormat(message)); } }
        public void E(string format, object arg0) { if (_isErrorEnabled) Error(null, _logStringFormator.DoFormat(format, arg0)); }
        public void E(string format, object arg0, object arg1) { if (_isErrorEnabled) Error(null, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void E(string format, object arg0, object arg1, object arg2) { if (_isErrorEnabled) Error(null, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void E(string format, params object[] args) { if (_isErrorEnabled) Error(null, _logStringFormator.DoFormat(format, args)); }
        public void E(Exception exception, object message) { if (_isErrorEnabled) Error(exception, _logStringFormator.DoFormat(message)); }
        public void E(Exception exception, string format, object arg0) { if (_isErrorEnabled) Error(exception, _logStringFormator.DoFormat(format, arg0)); }
        public void E(Exception exception, string format, object arg0, object arg1) { if (_isErrorEnabled) Error(exception, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void E(Exception exception, string format, object arg0, object arg1, object arg2) { if (_isErrorEnabled) Error(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void E(Exception exception, string format, params object[] args) { if (_isErrorEnabled) Error(exception, _logStringFormator.DoFormat(format, args)); }

        public void F(object message) { if (_isFatalEnabled) { Exception exc = message as Exception; if (exc != null) Fatal(exc, _logStringFormator.DoFormat(exc.Message)); else Fatal(null, _logStringFormator.DoFormat(message)); } }
        public void F(string format, object arg0) { if (_isFatalEnabled) Fatal(null, _logStringFormator.DoFormat(format, arg0)); }
        public void F(string format, object arg0, object arg1) { if (_isFatalEnabled) Fatal(null, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void F(string format, object arg0, object arg1, object arg2) { if (_isFatalEnabled) Fatal(null, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void F(string format, params object[] args) { if (_isFatalEnabled) Fatal(null, _logStringFormator.DoFormat(format, args)); }
        public void F(Exception exception, object message) { if (_isFatalEnabled) Fatal(exception, _logStringFormator.DoFormat(message)); }
        public void F(Exception exception, string format, object arg0) { if (_isFatalEnabled) Fatal(exception, _logStringFormator.DoFormat(format, arg0)); }
        public void F(Exception exception, string format, object arg0, object arg1) { if (_isFatalEnabled) Fatal(exception, _logStringFormator.DoFormat(format, arg0, arg1)); }
        public void F(Exception exception, string format, object arg0, object arg1, object arg2) { if (_isFatalEnabled) Fatal(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2)); }
        public void F(Exception exception, string format, params object[] args) { if (_isFatalEnabled) Fatal(exception, _logStringFormator.DoFormat(format, args)); }

    }
}

